1. Field of the Invention
The present invention relates to a method and an apparatus for measuring the three-dimensional position and orientation of an object, and more particularly, to a method and an apparatus permitting a short processing time and high-accuracy measurement, which are especially suited for use in industrial robots.
2. Description of Related Art
To cope with a situation in which it is not always possible to place a workpiece to be fed to an industrial robot in a predetermined position and orientation with respect to the robot, a visual sensor is generally used for measuring the position and orientation of workpieces to obtain position/orientation correction data. Particularly in the case where the position and orientation of a workpiece cannot be specified three-dimensionally, a three-dimensional visual sensor is used.
Three-dimensional visual sensors are generally classified into passive visual sensors called stereo vision and active visual sensors. The active visual sensors are further divided into a light radar type and a type using a light projecting method based on triangulation.
A passive stereo vision sensor uses two CCD cameras placed on its right and left, respectively, and a distance in the depth direction is measured through the triangulation technique, by using corresponding points in two images obtained by the cameras. However, if the images are more or less complicated, or if a major part shown in one image is hidden in the other image, it is difficult to find correspondence between the two images. Further, the passive sensor inherently has a disadvantage in that illuminating conditions greatly affect the measurement quality.
On the other hand, the active light radar method uses a laser beam spot as in a radar, wherein the laser beam is subjected to amplitude modulation, and a distance in the depth direction is measured based on the phase difference between the outgoing light and the reflected light. The laser beam scans two-dimensionally with the aid of two movable mirrors to obtain a range image. The range image is an image in which the values of pixels forming the image individually represent the distance to an object in the depth direction. Sensors of this type developed until now, however, are mainly for outdoor use, have a measurement limit of as large as over 20 m and a measuring accuracy in the depth direction of as low as about 1/200 of the measurement limit, and thus cannot be used for purposes of factory automation. Some sensors, which are still in the development stage, have short measurement limits and high resolutions in the depth direction, but they are expensive and do not meet the requirements for practical use.
Active sensors include those using a light projecting method based on triangulation, besides the above-described type. The active sensors based on light projection techniques employ a method in which more than ten patterns of light are projected onto an object to obtain a distance image, or a method in which an object is scanned with a laser slit light deflected by a movable mirror to obtain a range image. In the latter method, in order to recognize an object based on the obtained range image in measuring the position and orientation of the object, it is necessary that the range image be obtained by densely scanning the object with the laser slit light, to thereby eliminate data skip (data omission). However, for a screen size of 256.times.256 pixels commonly used in visual sensors of robots, 200 to 300 scans of slit light must be carried out, and as many images as the number of the scans need to be obtained with the camera.
As outlined above, in the conventional methods, a lot of time is required for the image acquisition or for the subsequent distance image transformation, or for the detection of an object from the obtained range image because of a vast amount of data. Thus, the long processing time has been the major drawback to the practical use of the conventional methods.
In order to shorten the processing time, there has been proposed a three-dimensional visual sensor in which crossed laser slit lights are projected onto an object, and the object is detected based on the obtained image information in measuring its three-dimensional position and orientation. This visual sensor is effective in detecting an object having a simple shape, but is not good enough in detecting an object of complicated configuration, because the available information is not large enough.
Thus, as discussed in the foregoing, the practical visual sensors capable of measuring the three-dimensional position and orientation of an object of complicated shape with high accuracy and in a short processing time matching with the acting time of robots are not yet available.